package zhoumo;

import java.util.Arrays;

public class regexObject {
    public static void main(String[] args) {
        String email="1121166572@qq.com";
        String regex="[a-zA-Z0-9_]+@[a-zA-Z0-9]+(\\.[a-zA-Z]+)+";
        boolean match=email.matches(regex);
        if (match){
            System.out.println("格式正确");
        }else {
            System.out.println("格式错误");
        }

        String line="123qwe12qwe123qwe";
        //line=line.replaceAll("[a-z]+","00");
        System.out.println("line = " + line);
        String[]data=line.split("[a-z]+");
        System.out.println(Arrays.toString(data));
        line="123.456.789...";
        data=line.split("\\.+");
        System.out.println(Arrays.toString(data));

    }


}
